﻿using PersonaLibrary.Data;
using PersonaLibrary.ViewModel.NoteViewModel;

namespace PersonaLibrary.Commands.EditCommands
{
	internal static class Commands
	{
		private static OrganizationDelete _deleteOrganization;
		private static DepartmentDelete _deleteDepartment;
		private static EmployeeDelete _deleteEmployee;
		private static SymplyDeleteCommand<ConnectionJobEmplDep> _deleteConnection;
		private static JobDeleteCommand _deleteJob;
		private static SymplyDeleteCommand<EmployeeNoteLink> _deleteEmployeeNoteLink;
		private static NoteDelete _deleteNote;

		private static SimplyNewCommand<ViewModel.ConnectionViewModel.EditConnectionViewModel> _newConnection;
		private static SimplyNewCommand<ViewModel.EmployeeViewModel.FullEmployeeViewModel> _newEmployee;
		private static SimplyNewCommand<ViewModel.JobViewModel.JobViewModel> _newJob;
		private static SimplyNewCommand<NoteViewModel> _newNote;
		private static SimplyNewCommand<ViewModel.EmployeeNoteLinkViewModel.EmployeeNoteLinkVM> _newNoteEmployeeLink;
		private static SimplyNewCommand<ViewModel.OrganizationsViewModel.OrganizationViewModel> _newOrganization;
		private static SimplyNewCommand<ViewModel.DepartmentsViewModel.DepartmentViewModel> _newDepartment;
		private static SimplyNewCommand<ConcateNotesViewModel> _mergeNotes;

		private static SimplyEditCommand<ViewModel.EmployeeNoteLinkViewModel.EmployeeNoteLinkVM> _editNoteEmployeeLink;
		private static SimplyEditCommand<ViewModel.OrganizationsViewModel.OrganizationViewModel> _editOrganization;
		private static SimplyEditCommand<ViewModel.DepartmentsViewModel.DepartmentViewModel> _editDepartment;
		private static SimplyEditCommand<ViewModel.EmployeeViewModel.FullEmployeeViewModel> _editEmployee;
		private static SimplyEditCommand<ViewModel.ConnectionViewModel.EditConnectionViewModel> _editConnection;
		private static SimplyEditCommand<ViewModel.JobViewModel.JobViewModel> _editJob;
		private static SimplyEditCommand<NoteViewModel> _editNote;

		private static LoadImageToEmployee _loadImageToEmployee;
		private static DeletePhotoCommand _deletePhoto;

		public static SimplyNewCommand<ConcateNotesViewModel> MergeNotes
		{
			get
			{
				if(_mergeNotes == null)
					_mergeNotes = new SimplyNewCommand<ConcateNotesViewModel>();

				return _mergeNotes;
			}
		}

		public static DeletePhotoCommand DeletePhoto
		{
			get
			{
				if(_deletePhoto == null)
					_deletePhoto = new DeletePhotoCommand();
				return _deletePhoto;
			}
		}

		public static LoadImageToEmployee LoadImage
		{
			get
			{
				if(_loadImageToEmployee == null)
					_loadImageToEmployee = new LoadImageToEmployee();
				return _loadImageToEmployee;
			}
		}

		public static SimplyEditCommand<NoteViewModel> EditNote
		{
			get
			{
				if(_editNote == null) _editNote = new SimplyEditCommand<NoteViewModel>();
				return _editNote;
			}
		}

		public static SimplyNewCommand<ViewModel.DepartmentsViewModel.DepartmentViewModel> NewDepartment
		{
			get
			{
				if (_newDepartment == null) _newDepartment = new SimplyNewCommand<ViewModel.DepartmentsViewModel.DepartmentViewModel>();
				return _newDepartment;
			}
		}

		public static SimplyNewCommand<ViewModel.OrganizationsViewModel.OrganizationViewModel> NewOrganization
		{
			get
			{
				if (_newOrganization == null) _newOrganization = new SimplyNewCommand<ViewModel.OrganizationsViewModel.OrganizationViewModel>();
				return _newOrganization;
			}
		}

		public static SymplyDeleteCommand<EmployeeNoteLink> DeleteEmployeeNoteLink
		{
			get
			{
				if (_deleteEmployeeNoteLink == null) _deleteEmployeeNoteLink = new SymplyDeleteCommand<EmployeeNoteLink>();
				return _deleteEmployeeNoteLink;
			}
		}

		public static SimplyEditCommand<ViewModel.EmployeeNoteLinkViewModel.EmployeeNoteLinkVM> EditNoteEmployeeLink
		{
			get
			{
				if (_editNoteEmployeeLink == null) _editNoteEmployeeLink = new SimplyEditCommand<ViewModel.EmployeeNoteLinkViewModel.EmployeeNoteLinkVM>();
				return _editNoteEmployeeLink;
			}
		}

		public static SimplyNewCommand<ViewModel.EmployeeNoteLinkViewModel.EmployeeNoteLinkVM> NewNoteEmployeeLink
		{
			get
			{
				if (_newNoteEmployeeLink == null) _newNoteEmployeeLink = new SimplyNewCommand<ViewModel.EmployeeNoteLinkViewModel.EmployeeNoteLinkVM>();
				return _newNoteEmployeeLink;
			}
		}

		public static SimplyNewCommand<ViewModel.NoteViewModel.NoteViewModel> NewNote
		{
			get
			{
				if (_newNote == null) _newNote = new SimplyNewCommand<ViewModel.NoteViewModel.NoteViewModel>();
				return _newNote;
			}
		}

		public static SimplyEditCommand<ViewModel.JobViewModel.JobViewModel> EditJob
		{
			get
			{
				if (_editJob == null) _editJob = new SimplyEditCommand<ViewModel.JobViewModel.JobViewModel>();
				return _editJob;
			}
		}

		public static JobDeleteCommand DeleteJob
		{
			get
			{
				if (_deleteJob == null) _deleteJob = new JobDeleteCommand();
				return _deleteJob;
			}
		}

		public static SimplyNewCommand<ViewModel.JobViewModel.JobViewModel> NewJob
		{
			get
			{
				if (_newJob == null) _newJob = new SimplyNewCommand<ViewModel.JobViewModel.JobViewModel>();
				return _newJob;
			}
		}

		public static SimplyNewCommand<ViewModel.EmployeeViewModel.FullEmployeeViewModel> NewEmployee
		{
			get
			{
				if (_newEmployee == null) _newEmployee = new SimplyNewCommand<ViewModel.EmployeeViewModel.FullEmployeeViewModel>();
				return _newEmployee;
			}
		}

		public static SymplyDeleteCommand<ConnectionJobEmplDep> DeleteConnection
		{
			get
			{
				if (_deleteConnection == null) _deleteConnection = new SymplyDeleteCommand<ConnectionJobEmplDep>();
				return _deleteConnection;
			}
		}

		public static SimplyEditCommand<ViewModel.ConnectionViewModel.EditConnectionViewModel> EditConnection
		{
			get
			{
				if (_editConnection == null) _editConnection = new SimplyEditCommand<ViewModel.ConnectionViewModel.EditConnectionViewModel>();
				return _editConnection;
			}
		}

		public static SimplyNewCommand<ViewModel.ConnectionViewModel.EditConnectionViewModel> NewConnection
		{
			get
			{
				if (_newConnection == null) _newConnection = new SimplyNewCommand<ViewModel.ConnectionViewModel.EditConnectionViewModel>();
				return _newConnection;
			}
		}

		public static NoteDelete DeleteNote
		{
			get
			{
				if (_deleteNote == null) _deleteNote = new NoteDelete();
				return _deleteNote;
			}
		}

		public static EmployeeDelete DeleteEmployee
		{
			get
			{
				if (_deleteEmployee == null) _deleteEmployee = new EmployeeDelete();
				return _deleteEmployee;
			}
		}

		public static DepartmentDelete DeleteDepartment
		{
			get
			{
				if (_deleteDepartment == null) _deleteDepartment = new DepartmentDelete();
				return _deleteDepartment;
			}
		}

		public static SimplyEditCommand<ViewModel.OrganizationsViewModel.OrganizationViewModel> EditOrganization 
		{ 
			get
			{
				if (_editOrganization == null) _editOrganization = new SimplyEditCommand<ViewModel.OrganizationsViewModel.OrganizationViewModel>();
				return _editOrganization;
			}
		}

		public static OrganizationDelete DeleteOrganization
		{
			get
			{
				if (_deleteOrganization == null) _deleteOrganization = new OrganizationDelete();
				return _deleteOrganization;
			}
		}

		public static SimplyEditCommand<ViewModel.DepartmentsViewModel.DepartmentViewModel> EditDepartment
		{
			get
			{
				if (_editDepartment == null) _editDepartment = new SimplyEditCommand<ViewModel.DepartmentsViewModel.DepartmentViewModel>();
				return _editDepartment;
			}
		}

		public static SimplyEditCommand<ViewModel.EmployeeViewModel.FullEmployeeViewModel> EditEmployee
		{
			get
			{
				if (_editEmployee == null) _editEmployee = new SimplyEditCommand<ViewModel.EmployeeViewModel.FullEmployeeViewModel>();
				return _editEmployee;
			}
		}
	}
}
